<template>
  <div class="not-found-page">
    <div class="not-found-content">
      <div class="error-image">
        <!-- 等待用户提供404图片 -->
        <img src="../static/404.png" alt="404" class="error-image-img" v-if="true">
      </div>
      <h1 class="error-code">404</h1>
      <h2 class="error-title">页面未找到</h2>
      <p class="error-message">抱歉，您访问的页面不存在或已被删除</p>
      <div class="button-group">
        <el-button type="primary" size="large" @click="goHome">返回首页</el-button>
        <el-button size="large" @click="goBack">返回上一页</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NotFound",
  methods: {
    goBack() {
      this.$router.back();
    },
    goHome() {
      this.$router.push("/login");
    }
  }
};
</script>

<style scoped>
.not-found-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f5f7fa;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.not-found-content {
  text-align: center;
  padding: 80px 80px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 750px;
  width: 90%;
  animation: fadeInUp 0.6s ease-out;
}

.error-image {
  margin-bottom: 50px;
  animation: float 3s ease-in-out infinite;
}

.error-image-img {
  width: 300px;
  height: auto;
  object-fit: contain;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.error-code {
  font-size: 140px;
  font-weight: 700;
  margin: 0 0 30px;
  color: #1a1a1a;
  line-height: 1;
}

.error-title {
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #303133;
}

.error-message {
  font-size: 18px;
  color: #8c8c8c;
  margin: 0 0 50px;
  line-height: 1.8;
}

.button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.button-group .el-button {
  padding: 14px 40px;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.button-group .el-button:hover {
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .not-found-content {
    padding: 60px 40px;
    width: 85%;
  }
  
  .error-image-img {
    width: 220px;
  }
  
  .error-code {
    font-size: 100px;
  }
  
  .error-title {
    font-size: 28px;
  }
  
  .error-message {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .not-found-content {
    padding: 50px 30px;
    width: 90%;
  }
  
  .error-image-img {
    width: 180px;
  }
  
  .error-code {
    font-size: 80px;
  }
  
  .error-title {
    font-size: 24px;
  }
  
  .error-message {
    font-size: 15px;
  }
  
  .button-group {
    flex-direction: column;
    width: 100%;
  }
  
  .button-group .el-button {
    width: 100%;
  }
}
</style>

